<?php 
	defined( '_JEXEC' ) or die( 'Restricted access' ); 
	jimport( 'joomla.environment.uri' );
?>
<div id="content" style="padding-left:10px;padding-right:10px">
	<div style="float:left; width:60%">
		<h2 class="contentheading"><?php echo $this->route->getName();?></h2>
	</div>
	<div class="myRouteTask" style="float:right; width:40%; margin-top:20px">
		<?php echo $this->loadTemplate('myRouteTask'); ?>
	</div>
	<div style="clear:left; float:left; width:100%">
		<p><?php echo $this->route->getDescription();?></p>
	</div>
	<span class="leading_separator">&nbsp;</span>
	<div id="details_map" style="float:left; clear:both; width:100%">
		<div style="clear:left; float:left; width:75%">
			<div style="float:left; width:50%">
				<?php $url=JURI::current()."/"; ?>
				<iframe src=<?php echo "http://www.facebook.com/plugins/like.php?href=".$url."&layout=standard&show_faces=false&width=450&action=like&colorscheme=light&height=35"?> scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe>
			</div>
			<div style="float:right; width:50%">
				<p style="text-align:right;margin-bottom:2px;margin-top:0px;"><a href="http://twitter.com/share" class="twitter-share-button" data-text="¡Mira esta ruta en Changoo!" data-count="horizontal" data-via="ChangooSocial" data-lang="es">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></p>
			</div>
			<div id="map_canvas" style="float: left; width: 100%; height: 400px; border: 1px solid black; margin-bottom:10px"></div>
		</div>
		<div id="details" style="float:right; width:23%">
			<br/><br/>
			<center>
				<div class="authorBox" style="width:100%; margin-top:0px">
					<div class="authorName" style="width:100%; clear:both; margin-top:0px; margin-bottom:2px">
						<p style="margin-top:0px; margin-bottom:0px;"><b><?php echo $this->route->getUser()->username; ?></b></p>
					</div>
					<div class="authorAvatar" style="width:100%; clear:both; float:left;">
						<a href="<?php echo CRoute::_('index.php?option=com_community&view=profile&userid='.$this->route->getUser()->get('id'));?>">
							<img width="40px" height="40px" src="<?php echo $this->route->getUser()->getThumbAvatar(); ?>" title="<?php echo $this->route->getUser()->username; ?>" />
						</a>
					</div>
				</div>
			</center>
			<div id="distanceTime" style="float:left;width:100%; margin-top:20px">
				<div style="float:left; width:100%;text-align:center">
					<p id="distance"><b><?php echo JText::_('ROUTEDETAILS_DISTANCE');?></b></p> <p><?php echo $this->route->getDistance();?> km</p>
				</div>
				<div style="float:left; width: 100%;text-align:center">
					<p id="time"><b><?php echo JText::_('ROUTEDETAILS_TIME');?></b></p> <p><?php echo $this->route->getTime();?></p>
				</div>
			</div>
			<center>
				<div id="options" style="float:left;width:100%;margin-top:10px">
					<a href="<?php echo "index.php?option=com_socialroutes&task=downloadRoute&id=".$this->route->getId()."&view=default&format=raw" ?>"><img width="70px" height="70px" src="components/com_socialroutes/images/download.jpg" title="<?php echo JText::_('VIEWROUTE_GETGPX');?>" /></a>
				</div>
			</center>
				<center>
				<div id="options" style="float:left;width:100%;margin-top:10px">

					<form action="index.php" method="get">
						
			          <input type="hidden" id="option" name="option" value="<?php echo $this->option;?>" />
			          <input type="hidden" id="task" name="task" value="similarRoute" />
			          <input type="hidden" id="userid" name="userid" value="<?php echo $this->route->getUser()->get('id')?>" />
			          <input type="hidden" id="view" name="view" value="routelist" />
			       	  <input type="hidden" id="id" name="id" value="<?php echo $this->route->getId();?>" />
			       	  
			       
			       
				     <blockquote class="rectangle-speech-border2" style="margin-right:2px;margin-left:2px">
					 <?php echo JText::_('VIEWROUTE_SIMILAR');?>
					 <input type="text" id="keywords" name="keywords"/>
			   
			         
			
			
			        <center style="margin-top:10px"><input type="submit" class="small awesome" id="submit" value="<?php echo JText::_('VIEWROUTE_SIMILAR_SUBMIT');?>"/></center>
		           </form>
					

					<?php//."&latlong=".$this->locatePosition()?>
				</div>
				
			</center>
		</div>
	</div> 
	<span class="leading_separator">&nbsp;</span>
	<div id="datosRuta" class="blog">
		<div id="elevacion" style="clear:left; width:100%; display:none;">
			<h3 style="margin-bottom:0px;"><?php echo JText::_('VIEWROUTE_ELEVATIONPROFILE');?></h3>
			<div id="elevation_chart" style="float:left;width:631px; height:150px; "></div>
			<span class="leading_separator">&nbsp;</span>
		</div>
		<div id="comments" style="clear:left; width:100%">
			<h3 style="margin-bottom:0px;"><?php echo JText::_('VIEWROUTE_COMMENTS');?></h3>
			<div style="float:left; clear:left; width: 100%">
				<?php echo $this->loadTemplate('comments'); ?>
			</div>
			<div style="float:left; clear:left; width: 100%">
				<p id="commentPar"><a href="" id="commentLink"><b><?php echo JText::_('VIEWROUTE_COMMENTBUTTON');?></b></a> </p>
				<div id="commentForm" style="clear:left; width:100%; display:none">
					<?php echo $this->loadTemplate('commentsForm'); ?>
				</div>
				<span class="leading_separator">&nbsp;</span>
			</div>
		</div>
	</div>
</div>
